Skip to content

Fix doc string of make_signature() function #23768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2018
Merged

Fix doc string of make_signature() function #23768

merged 3 commits into from
Nov 22, 2018

Conversation

srinivasreddy
Copy link
Contributor

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@pep8speaks
Copy link

pep8speaks commented Nov 18, 2018

Hello @srinivasreddy! Thanks for updating the PR.

Comment last updated on November 21, 2018 at 14:41 Hours UTC

@srinivasreddy srinivasreddy changed the title Improve doc string of make_string() function Improve doc string of make_signature() function Nov 18, 2018
@codecov
Copy link

codecov bot commented Nov 18, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@6e932f8). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #23768   +/-   ##
=========================================
  Coverage          ?   92.29%           
=========================================
  Files             ?      161           
  Lines             ?    51490           
  Branches          ?        0           
=========================================
  Hits              ?    47521           
  Misses            ?     3969           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.68% <100%> (?)
#single 42.32% <0%> (?)
Impacted Files Coverage Δ
pandas/api/extensions/__init__.py 100% <ø> (ø)
pandas/util/_decorators.py 91.34% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e932f8...bb8640f. Read the comment docs.

@srinivasreddy srinivasreddy changed the title Improve doc string of make_signature() function Fix doc string of make_signature() function Nov 18, 2018
@@ -314,14 +314,15 @@ def indent(text, indents=1):

def make_signature(func):
"""
Returns a string repr of the arg list of a func call, with any defaults.
Returns a string repr of tuple - the arg list of a func call with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short description for docstrings should fit on one line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@WillAyd WillAyd added the Docs label Nov 19, 2018
Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you run scripts/validate_docstrings.py against this and make sure no errors?

@@ -314,14 +314,14 @@ def indent(text, indents=1):

def make_signature(func):
"""
Returns a string repr of the arg list of a func call, with any defaults.
Returns a string repr of tuple - the arg list with any defaults and arg list.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think this was better before the change - any reason you wanted to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring is wrong and outdated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK. Let's just say Returns a tuple containing the parameter list with default arguments and the parameter list or something to the effect. string repr is incorrect

@srinivasreddy
Copy link
Contributor Author

@WillAyd Done with the changes. Please take a look again.

@srinivasreddy
Copy link
Contributor Author

I ran scripts/validate_docstrings.py, i didn't introduce any docstring errors.

@@ -314,14 +314,14 @@ def indent(text, indents=1):

def make_signature(func):
"""
Returns a string repr of the arg list of a func call, with any defaults.
Returns a string repr of tuple - the arg list with any defaults and arg list.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK. Let's just say Returns a tuple containing the parameter list with default arguments and the parameter list or something to the effect. string repr is incorrect


Examples
--------
>>> def f(a,b,c=2) :
>>> def f(a,b,c=2):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could still use spacing between parameters here


Examples
--------
>>> def f(a,b,c=2) :
>>> def f(a,b,c=2):
>>> return a*b*c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And between operators / operands here

@srinivasreddy
Copy link
Contributor Author

@WillAyd Done

@WillAyd
Copy link
Member

WillAyd commented Nov 20, 2018

@srinivasreddy looks like you have a travis failure on the code checks if you can take a look

@srinivasreddy
Copy link
Contributor Author

@WillAyd I have seen the difference between failing travis job and successful one, but i couldn't find any difference. Could you please help in figuring it?

@WillAyd
Copy link
Member

WillAyd commented Nov 21, 2018

You've got a flake8 issue here in pandas/util/_decorators.py line 317 for being too long (can also check the flake8 error message above in thread).

@srinivasreddy
Copy link
Contributor Author

Done . Merge pls

@WillAyd WillAyd merged commit 20ae454 into pandas-dev:master Nov 22, 2018
@WillAyd
Copy link
Member

WillAyd commented Nov 22, 2018

Thanks @srinivasreddy

@srinivasreddy srinivasreddy deleted the fix branch November 22, 2018 05:00
@gfyoung gfyoung added this to the 0.24.0 milestone Nov 22, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants